var theApplet = null;
var p_chartType = 1;//模式切换
        //java Applet的操作   
//theApplet = document.frames['leftFrame'].contentWindow.theApplet;

function getWWJApplet()
{
   if (theApplet == null) {
      //theApplet = document.getElementById('wwjApplet');
	
  theApplet = parent.document.getElementById('leftFrame').contentWindow.document.getElementById('wwjApplet');
   }
   // See if we're using the old Java Plug-In and the JNLPAppletLauncher
   try {
      theApplet = theApplet.getSubApplet();
	     	     
   } catch (e) {
      // Using new-style applet -- ignore
   }
   return theApplet;
}
//卫星模式
 function onSatellite(){  
//       	if(p_chartType==2){
//			return ;
//		}
		p_chartType=2;
//		shouMode();
	 getWWJApplet().earthShowSatellite()
  }    
  //海图模式			
 function onSeaChart(){  

		p_chartType=1;
		getWWJApplet().earthShowSeaChart();
       	//shouMode();		  				 
}     
